import 'package:flutter/material.dart';

import 'logger.dart';

class ExceptionLogDetailPage extends StatefulWidget {
  final ExceptionLog log;

  const ExceptionLogDetailPage({Key? key, required this.log}) : super(key: key);

  @override
  _ExceptionLogDetailPageState createState() => _ExceptionLogDetailPageState();
}

class _ExceptionLogDetailPageState extends State<ExceptionLogDetailPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('异常详情'),
        centerTitle: true,
      ),
      body: Padding(
        padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 10),
        child: SingleChildScrollView(
          child: Column(
            children: [
              Text(widget.log.exception),
              Divider(height: 21),
              Text(widget.log.stack),
            ],
          ),
        ),
      ),
    );
  }
}
